#include<iostream>
using namespace std;
void add(double* a, double b);  // 直接修改a的值

int main(){
    double a = 2.0, b = 3.0;
    cout << "Now a = " << a << endl;
    add(&a, b);
    cout << "Now a = " << a << endl;
}

void add(double* a, double b){
    *a = *a + b;
}